class Game(object):
    __instance = None
    __flage_staue = False # 保证只初始化一次标识
    def __new__(cls, *args, **kwargs):
        if cls.__instance == None:
            cls.__instance = object.__new__(cls)
            return cls.__instance
        else:
            return cls.__instance

    # def __init__(self,name):
    #     self.name = name



    def __init__(self,name):
        if Game.__flage_staue == False:
            Game.__flage_staue = True
            self.name = name



game = Game("wang")
print(id(game))
print(game.name)

game2 = Game("baofeng")
print(id(game2))
print(game2.name)




